<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
${aier_doctype}
<html <s:property value="aier_html_xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>${aier_title}</title>
<meta content="${aier_keywords}" name="keywords">
<meta content="${aier_description}" name="description">
<link href="${aier_css_url}jc/chosen.css" rel="stylesheet">
<link rel="stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}/ui.css" />
<link rel="stylesheet" href="${aier_css_url}comm/text.css" />
<link rel="stylesheet" href="${aier_css_url}b.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/jq-msg.css" />
<link rel="stylesheet" href="${aier_css_url}comm/fb.css" />

<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/hh/ui.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/msg.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/arrayList.js"></script>
<script type="text/javascript" src="${aier_js_url}jc/cj.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/jq.js"></script>
<script type="text/javascript" src="${aier_js_url}jq/cn.js"></script>
<script type="text/javascript" src="${aier_js_url}comm/text.js"></script>
<title>意见反馈</title>
</head>
<script type="text/javascript">
$(document).ready(function(){
	$("#feedbackinfo").jqGrid({                
		url:'${aier_url}${aier_urijs}customermanage_searchFeedback${aier_suffix}',                
		datatype:"json",                
		mtype:'GET',
		height:'230',
		width:'960',              
		colNames:['标题','日期','跟单员','结果','评分','查阅','状态','编号','内容','跟单员id','uid'],                
		colModel:[                    
		{name:'title',index:'title',width:120,align:'center'},                    
		{name:'cdate',index:'cdate',width:100,align:'center'},                    
		{name:'name',index:'name',width:80,align:'center'},
		{name:'stateStr',index:'stateStr',width:80,align:'center'},
		{name:'score',index:'score',width:80,align:'center'},
		{name:'revoked',index:'revoked',width:80,align:'center', sortable:false},
		{name:'state',index:'state',hidden : true},
		{name:'fbid',index:'fbid',hidden : true},
		{name:'content',index:'content',hidden : true},
		{name:'handler',index:'handler',hidden : true},
		{name:'uid',index:'uid',hidden : true},
		],
		//autowidth:true,
		jsonReader: {
			root:"fbList",
			page: "page",
			total: "page_count",
			records : "count",
			repeatitems: false
		},
		pager: jQuery("#feedbackpage"),
		prmNames : {page:"page",sort: "sort"},
		rowNum: 10,
		//rowList: [10, 20, 30],
		sortname: 'cdate',
		hidegrid: false,
		sortorder: 'desc',
		viewrecords: true,
		caption: '意见反馈',
		gridComplete:function(){
			var ids=jQuery("#feedbackinfo").jqGrid('getDataIDs');
			for(var i=0; i<ids.length; i++){
				var id=ids[i]; 
				var sc;
				var score = jQuery("#feedbackinfo").jqGrid('getRowData', id).score;
				var state = jQuery("#feedbackinfo").jqGrid('getRowData', id).state;
				if (score==-1) {
					sc = "<a href='javascript:;' class='jqtrow'>--</a>"; 
				} else {
					sc=score;
				}
				var cdateStr = jQuery("#feedbackinfo").jqGrid('getRowData', id).cdate;
				var cdateStr = jQuery("#feedbackinfo").jqGrid('getRowData', id).cdate;
				if (!isnull(cdateStr)) {
					cdateStr = cdateStr.split(".")[0];
					cdateStr = cdateStr.split("T")[0]+" "+cdateStr.split("T")[1];;
				}
				var re = "<a href='javascript:;' class='jqtrow' onclick='optionManage(" + id + ")'>查看</a>"; 
				jQuery("#feedbackinfo").jqGrid('setRowData', ids[i], { revoked: re,score:sc,cdate:cdateStr });
			}
		}
	}).navGrid("#feedbackpage", { edit: false, add: false, del: false, search: false });
});	
</script>
<body style="background-color: #EEF2FB;">
    
    <div style="background-color: #EEF2FB;width: 100%;height: 700px; ">	
				<div id="tabs">
					<ul>
						<li><a href="#tabs-1">意见反馈</a></li>
					</ul>
					<div id="tabs-1" style="height: 500px;">
						<div class="d_content">
							<!-- 表格 -->
							<div style="margin-left: 0px;margin-top: 0px;">
								<table id="feedbackinfo"></table>
								<div id="feedbackpage"></div>
							</div>
						</div>
					</div>
				</div>
	</div>
</body>
<script type="text/javascript">
	$("#tabs").tabs();
	function optionManage(id) {
		var fbid = jQuery("#feedbackinfo").jqGrid('getRowData', id).fbid;
		var uid = jQuery("#feedbackinfo").jqGrid('getRowData', id).uid;
		//window.location.href="${aier_url}zxadmin/customer_detail${aier_suffix}?fbid="+fbid+"&title="+title+"&cdate="+cdate+"&content="+content+"&state="+state+"&mid="+mid+"&uid="+uid;
		window.location.href="${aier_url}zxadmin/customer_detail${aier_suffix}?fbid="+fbid+"&uid="+uid;
	
	}
</script>
</html>